<!-- aside公共组件 -->

<script setup>
import {
    Management,
    Promotion,
    UserFilled,
    User,
    Crop,
    EditPen,
    SwitchButton,
    CaretBottom,
    Menu as IconMenu,
} from '@element-plus/icons-vue'
// import avatar from '@/assets/default.png'


</script>


<template>
    <el-container class="layout-container">
        <!-- 左侧菜单 -->
        <el-aside width="200px">
            <div class="el-aside__logo">
                <!-- <img src="../assets/image/Group 5@2x.png" alt=""> -->
            </div>
            <div class="btn">
                <el-button type="primary" style="width: 168px;height: 36px;">
                    <!-- <img src="../../assets/image/" alt=""> -->
                    <el-icon>
                        <location />
                    </el-icon>
                    我要卖
                </el-button>
            </div>
            <el-menu router>
                <el-menu-item index="/">
                    <el-icon>
                        <Management />
                    </el-icon>
                    <span>卖家中心</span>
                </el-menu-item>
                <!-- 自抽号管理 -->
                <el-sub-menu index="2">
                    <template #title>
                        <el-icon><icon-menu /></el-icon>
                        <span>自抽号管理</span>
                    </template>
                    <el-menu-item index="/selfdraw/commodity">
                        <el-icon>
                            <User />
                        </el-icon>
                        <span>商品管理</span>
                    </el-menu-item>
                    <el-menu-item index="/selfdraw/order">
                        <el-icon>
                            <Crop />
                        </el-icon>
                        <span>订单管理</span>
                    </el-menu-item>
                    <el-menu-item index="/selfdraw/repertory">
                        <el-icon>
                            <EditPen />
                        </el-icon>
                        <span>库存管理</span>
                    </el-menu-item>
                    <el-menu-item index="/selfdraw/afterSale">
                        <el-icon>
                            <EditPen />
                        </el-icon>
                        <span>售后</span>
                    </el-menu-item>
                </el-sub-menu>
                <!-- 初始号管理 -->
                <el-sub-menu index="3">
                    <template #title>
                        <el-icon><icon-menu /></el-icon>
                        <span>初始号管理</span>
                    </template>
                    <el-menu-item index="/initial/gameList">
                        <el-icon>
                            <User />
                        </el-icon>
                        <span>游戏列表</span>
                    </el-menu-item>
                    <el-menu-item index="/initial/inventory">
                        <el-icon>
                            <Crop />
                        </el-icon>
                        <span>库存管理</span>
                    </el-menu-item>
                    <el-menu-item index="/initial/orderList">
                        <el-icon>
                            <EditPen />
                        </el-icon>
                        <span>订单列表</span>
                    </el-menu-item>
                </el-sub-menu>
                <!-- 账户余额 -->
                <el-menu-item index="/account/balance">
                    <el-icon>
                        <Management />
                    </el-icon>
                    <span>账户余额</span>
                </el-menu-item>
            </el-menu>
        </el-aside>
        <!-- 右侧主区域 -->
        <el-container>
            <!-- 头部区域 -->
            <!-- <el-header>
                <div class="maijia">卖家中心
                    <strong>张三</strong>
                </div>
                <el-dropdown placement="bottom-end">
                    <span class="el-dropdown__box">
                        <el-avatar :src="avatar" />
                        <el-icon>
                            <CaretBottom />
                        </el-icon>
                    </span>
                    <template #dropdown>
                        <el-dropdown-menu>
                            <el-dropdown-item command="profile" :icon="User">基本资料</el-dropdown-item>
                            <el-dropdown-item command="avatar" :icon="Crop">更换头像</el-dropdown-item>
                            <el-dropdown-item command="password" :icon="EditPen">重置密码</el-dropdown-item>
                            <el-dropdown-item command="logout" :icon="SwitchButton">退出登录</el-dropdown-item>
                        </el-dropdown-menu>
                    </template>
                </el-dropdown>
            </el-header> -->
            <!-- 中间区域 -->
            <el-main>
                <!-- <div style="width: 1290px; height: 570px;border: 1px solid red;">
                    main
                </div> -->
                <router-view />
            </el-main>
            <!-- 右侧固定定位 -->
            <div class="msg">
                <div class="msg_top">消息</div>
                <div class="msg_bom">客服</div>
            </div>
            <!-- 底部区域 -->
            <!-- <el-footer>备案号</el-footer> -->
        </el-container>
    </el-container>
</template>

<style lang="scss" scoped>
.layout-container {
    height: 100vh;

    .el-aside {
        background-color: #FFFFFF;
        border-radius: 10px;

        &__logo {
            height: 120px;
            background: url('../assets/image/Group\ 5@2x.png') no-repeat center / 120px auto;
        }

        .btn {
            width: 200px;
            height: 68px;
            text-align: center;
        }

        .el-menu {
            border-right: none;
        }
    }

    .el-header {
        background-color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;


        .el-dropdown__box {
            display: flex;
            align-items: center;

            .el-icon {
                color: #999;
                margin-left: 10px;
            }

            &:active,
            &:focus {
                outline: none;
            }
        }
    }

    .msg {
        width: 72px;
        height: 154px;
        background-color: #ebcaca;
        // 固定定位
        position: fixed;
        top: 350px;
        right: 10px;

        .msg_top {
            width: 72px;
            height: 72px;
            background-color: #FFFFFF;
            border-radius: 10px;
        }

        .msg_bom {
            width: 72px;
            height: 72px;
            background-color: #FFFFFF;
            margin-top: 10px;
            border-radius: 10px;
        }
    }

    .el-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #666;
    }
}
</style>